#ifndef _H_CONVERT_VALUE_TO_STRING_H_
#define _H_CONVERT_VALUE_TO_STRING_H_

#include <string>
#include <sstream>
#include "Ogre.h"
using namespace std;
//using namespace Ogre;
class ConvertValueToString{
private:
public:
	static string DoubletoString(double val){
		stringstream ss;
		ss << val;
		return ss.str();
	}
	static string Vector3toString(Ogre::Vector3 val){
		/*Ogre提供的StringConverter可以parse的Vector3型式為 "x y z"
		  所以會在字串內插入空白 , Vector4也是相同作法
		*/
		string result;
		result = DoubletoString((double)val.x);
		result+=" ";
		result+= DoubletoString((double)val.y);
		result+=" ";
		result+= DoubletoString((double)val.z);
		return result;
	}
	static string Vector4toString(Ogre::Vector4 val){
		string result;
		result = DoubletoString((double)val.x);
		result+=" ";
		result+= DoubletoString((double)val.y);
		result+=" ";
		result+= DoubletoString((double)val.z);
		result+=" ";
		result+= DoubletoString((double)val.w); 
		return result;
	}

};
#endif